import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'

const getFoodHealth = ({
    actionCreators,
    UIComponent,
    type,
}) => {
    return connect(
        state => state[ type ],
        dispatch => bindActionCreators(
            actionCreators,
            dispatch
        )
    )(UIComponent)
}

export default getFoodHealth